/* * A QAD hack to keep a hotlist for Amiga Mosaic 1.2. * * Copyright 1994, Mike W. Meyer */ /* Argument parsing - what there is of it */ parse arg infile outfile if infile = "" then infile = "envarc:Mosaic/hotlist.html" if outfile = "" then outfile = "env:Mosaic/hotlist.html" /* Get the line to be added */ options results 'get url' url = result 'fetch title' new = ''result'' /* Get my two file handles */ nofile = ~open(infile, infile, 'Read') if ~open(outfile, outfile, 'Write') then exit 10 /* * Copy (or create) the header. Everything up to the first blank line * in the input file is header, and left alone. */ if nofile then do call writeln outfile, "Hotlist" , "

Pages of interest

" call writeln outfile, "" end else do until line = "" line = readln(infile) call writeln outfile, line end /* Add the new line */ call writeln outfile, new /* Now copy the rest */ if nofile then call writeln outfile, "" else do until eof(infile) line = readln(infile) call writeln outfile, line end /* Clean up, and copy outfile back to infile */ call close outfile call close infile address command 'copy' outfile infile exit 0